<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>二手图书交易平台 - 管理系统</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        .iframe-container {
            width: 100%;
            height: calc(100vh - 2rem);
            border: none;
            border-radius: 0.5rem;
        }
        .menu-item:hover {
            background-color: #4B5563;
        }
        .menu-item.active {
            background-color: #4B5563;
        }
    </style>
</head>
<body class="bg-gray-100">
    <div class="flex h-screen">
        <!-- 左侧菜单 -->
        <div class="w-64 bg-gray-800 text-white">
            <div class="p-4 text-xl font-bold border-b border-gray-700">
                <i class="fas fa-book-open mr-2"></i>图书交易管理
            </div>
            <nav class="mt-4">
                <a href="pages/user.html" target="mainFrame" class="menu-item flex items-center px-4 py-3 text-gray-300 hover:text-white">
                    <i class="fas fa-users mr-3"></i>用户管理
                </a>
                <a href="pages/books.html" target="mainFrame" class="menu-item flex items-center px-4 py-3 text-gray-300 hover:text-white">
                    <i class="fas fa-book mr-3"></i>图书管理
                </a>
                <a href="pages/trades.html" target="mainFrame" class="menu-item flex items-center px-4 py-3 text-gray-300 hover:text-white">
                    <i class="fas fa-exchange-alt mr-3"></i>交易管理
                </a>
                <a href="pages/announcement.html" target="mainFrame" class="menu-item flex items-center px-4 py-3 text-gray-300 hover:text-white">
                    <i class="fas fa-bullhorn mr-3"></i>公告管理
                </a>
                <a href="pages/sensitive-words.html" target="mainFrame" class="menu-item flex items-center px-4 py-3 text-gray-300 hover:text-white">
                    <i class="fas fa-filter mr-3"></i>敏感词管理
                </a>
                <a href="pages/operation-log.html" target="mainFrame" class="menu-item flex items-center px-4 py-3 text-gray-300 hover:text-white">
                    <i class="fas fa-history mr-3"></i>操作日志
                </a>
                <a href="pages/statistics.html" target="mainFrame" class="menu-item flex items-center px-4 py-3 text-gray-300 hover:text-white">
                    <i class="fas fa-chart-bar mr-3"></i>数据统计
                </a>
                <a href="pages/settings.html" target="mainFrame" class="menu-item flex items-center px-4 py-3 text-gray-300 hover:text-white">
                    <i class="fas fa-cog mr-3"></i>系统设置
                </a>
            </nav>
        </div>

        <!-- 主内容区域 -->
        <div class="flex-1 p-4">
            <iframe name="mainFrame" src="pages/user.html" class="iframe-container"></iframe>
        </div>
    </div>

    <script>
        // 菜单项点击高亮效果
        document.querySelectorAll('.menu-item').forEach(item => {
            item.addEventListener('click', () => {
                document.querySelectorAll('.menu-item').forEach(i => i.classList.remove('active'));
                item.classList.add('active');
            });
        });
    </script>
</body>
</html>